<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../js/vue.js"></script>
</head>
<body>
  <div id="app">
    {{categoryInfo}}
    <br>
    栏目名称：<input type="text" v-model.lazy="categoryInfo.name"><br>
    父栏目Id：<input type="text" v-model.number.trim="categoryInfo.parentId"><br>
    地址：
    <select v-model="categoryInfo.address">
      <option value="beijing">北京</option>
      <option value="shanghai">上海</option>
      <option value="suzhou">苏州</option>
    </select>
    <br>
    性别：
    <input type="radio" value="male" v-model="categoryInfo.gender">男
    <input type="radio" value="female" v-model="categoryInfo.gender">女
    <br>
    爱好：
    <input type="checkbox" value="basketball" v-model="categoryInfo.hobby">篮球
    <input type="checkbox" value="football" v-model="categoryInfo.hobby">足球
    <input type="checkbox" value="dancing" v-model="categoryInfo.hobby">跳舞
    <br>
    简介：
    <textarea cols="30" rows="10" v-model="categoryInfo.description"></textarea>
    <br>
    <button @click="clickHandler">改变数据</button>
  </div>
  <script>
    new Vue({
      el: '#app',
      data: {
        msg: '',
        categoryInfo: {
          hobby: []
        }
      },
      methods: {
        // ajax交互
        savaOrUpdate() {
          
        },
        clickHandler() {
          this.msg = 'hello vue'
        }
      }
    })
  </script>
</body>
</html>